package com.itqf.ipmsys.service.impl;

import com.itqf.ipmsys.entity.Permission;
import com.itqf.ipmsys.mapper.PermissionMapper;
import com.itqf.ipmsys.service.PermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 权限表 服务实现类
 * </p>
 *
 * @author corn
 * @since 2021-09-22
 */
@Service
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements PermissionService {

    @Autowired
    private PermissionMapper permissionMapper;

    /**
     * 根据roleids查询权限集合
     *
     * @param roleIds
     * @return
     */
    @Override
    public List<Permission> findPermissionsByRoleIds(List<Integer> roleIds) {
        return permissionMapper.selectPermissionsByRoleIds(roleIds);
    }
}
